using Orchard.ContentManagement;
using Orchard.Localization;
using Orchard.Recipes.Models;

namespace Orchard.Recipes.Services
{
    public abstract class RecipeBuilderStep : Component, IRecipeBuilderStep
    {
        public abstract string Name { get; }
        public abstract LocalizedString DisplayName { get; }
        public abstract LocalizedString Description { get; }
        public virtual int Priority => 0;
        public virtual int Position => 0;
        public virtual bool IsVisible => true;

        protected virtual string Prefix => GetType().Name;

        public virtual dynamic BuildEditor(dynamic shapeFactory)
        {
            return null;
        }

        public virtual dynamic UpdateEditor(dynamic shapeFactory, IUpdateModel updater)
        {
            return null;
        }

        public virtual void Configure(RecipeBuilderStepConfigurationContext context)
        {
        }

        public virtual void ConfigureDefault()
        {
        }

        public virtual void Build(BuildContext context) { }
    }
}